<template>
  <div class="goodesmodelbox">
    <el-dialog
      :showClose="false"
      title="店铺信息"
      :visible.sync="centerDialogVisible"
      height="100%"
      top
      width="100%"
    >
      <StoreInformation :currentRow="currentRow"></StoreInformation>
      <span slot="footer" class="dialog-footer">
        <el-button @click="cancelgoodesmodel">取 消</el-button>
        <!-- <el-button type="primary" @click="savegoodesmodel">确 定</el-button> -->
      </span>
    </el-dialog>
  </div>
</template>

<script>
import StoreInformation from "@/views/mall/managementend/memberList/components/StoreInformation.vue";
export default {
  name: "StoreInfo",
  components: {
    StoreInformation,
  },
  props: {
    centerDialogVisible: Boolean,
    currentRow: Object,
    enterType: Number,
    cancelSubmit: Number,
  },
  data() {
    return {};
  },
  methods: {
    cancelgoodesmodel() {
      this.$emit("cancelgoodesmodel", false);
    }, // 取消按钮 传值
    savegoodesmodel() {},
    getGenderText(type) {
      switch (type) {
        case 1:
          return "男";
        case 2:
          return "女";
        // case 3:
        //   return "";
        default:
          return "未知";
      }
    },
    getTypeText(type) {
      switch (type) {
        case 1:
          return "个人";
        case 2:
          return "公司";
        default:
          return "未知";
      }
    },
  },
  mounted() {
    if (this.enterType === 2) {
      this.addgoodsinfo = this.currentRow;
    }
  },
  created() {
    if (this.enterType === 2) {
      this.addgoodsinfo = this.currentRow;
    }
  },
  watch: {
    centerDialogVisible(newVal) {
      // 监听 centerDialogVisible 的变化
      if (!newVal) {
        // 当 centerDialogVisible 变为 false 时触发事件
        this.$emit("close-dialog");
      }
    },
  },
};
</script>

<style lang="scss">
.info {
  width: 800px;
  .descriptions {
    // position: absolute;
  }
}
</style>
